#! /usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) JoinQuant Development Team
# Author: Huayong Kuang <kuanghuayong@joinquant.com>

from __future__ import print_function


def hook():
    print("------ hook")
    return "hello"


def foo():
    try:
        # raise Exception("test")
        print(hook())
        pass
    except Exception as e:
        print("------ capture the abnormal")
        print("------", e)
        raise
    else:
        print("------ else")
    finally:
        print("------ finally")


print(foo())
